<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'events-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<?php echo $form->hiddenField($model,'creator_id',array('value'=>Yii::app()->user->id));?>

	<div class="row">
		<?php echo $form->labelEx($model,'title'); ?>
		<?php echo $form->textField($model,'title',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'title'); ?>
	</div>

	<div class="row">
		<?php $this->widget('ext.ckeditor.CKEditorWidget',array(
		  "model"=>$model,                 # Data-Model
		  "attribute"=>'decription',       # Attribute in the Data-Model
		  "defaultValue"=>"Test Text",     # Optional
		 
		  "config" => array(
			  "height"=>"400px",
			  "width"=>"100%",
			  //"toolbar"=>"basic",
			  ),
		  "ckEditor"=>Yii::app()->basePath."/../ckeditor/ckeditor.php",                             
		  "ckBasePath"=>Yii::app()->baseUrl."/ckeditor/",                   
		  ) 
	  );
	?>
	</div>


	<div class="row">
		<?php echo $form->labelEx($model,'type'); ?>
		<?php echo $form->textField($model,'type'); ?>
		<?php echo $form->error($model,'type'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'from'); ?>
		<?php 
		$this->widget('ext.timepicker.timepicker', array(
			'model'=>$model,
			'name'=>'from',
		));
		?>
		<?php echo $form->error($model,'from'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'until'); ?>
			<?php 
		$this->widget('ext.timepicker.timepicker', array(
			'model'=>$model,
			'name'=>'until',
		));
		?>
		<?php echo $form->error($model,'until'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->